package by.grsu.coctails.fragments;

import java.util.List;

import by.grsu.coctails.R;
import by.grsu.coctails.db.task.CommonGetAsyncTask;
import by.grsu.coctails.db.task.GetMyCoctailsAsyncTask;
import by.grsu.coctails.model.Coctail;

public class MyCoctailsFragment extends ListCoctailFragment {

	@SuppressWarnings("rawtypes")
	@Override
	public CommonGetAsyncTask getTask(String categoryName) {
		return new GetMyCoctailsAsyncTask(getActivity(), categoryName) {

			@Override
			public void onComplete(List<Coctail> result) {
				sucess(result);
			}
		};
	}

	@Override
	protected void onIngredientChandged(String name, int state) {
		reloadDataFromDB();
	}

	@Override
	public String getTitle() {
		return getString(R.string.my_coctails);
	}
}
